<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2018/5/26
  Time: 21:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户登录页面</title>
</head>
<body>
<h1 style="text-align:center;margin-top:50px">登录界面</h1>

<div style="text-align:center;margin-top:100px">

<form method="post" action="loginHandler.jsp">
    <caption>用户登录</caption><br/>
    <table style="margin-left:40%">

    用户名：<input type="text" name="username"  size="20"><br/>
      密码：<input type="password" name="password" size="20"><br/>
    </table>

    <input type="submit" value="登录">
    <button>
        <a href="register.jsp">注册</a><br/>
    </button>

</form>

    <SCRIPT>
        function check()
        {
            var u = document.getElementById("username").value;
            if (u == null || u == "")
            {
                alert("用户名不能为空，请重新输入");
                return false;
            }
            var p = document.getElementById("password").value;
            if (p == null || p == "")
            {
                alert("密码不能为空");
                return false;
            }
        }
    </SCRIPT>

</div>
</body>
</html>
